/* 
 * File:   menu.h
 * Author: Marcel
 *
 * Created on 11. September 2012, 05:23
 */

#ifndef MENU_H
#define	MENU_H

/*	Item = Selectable item
	Exit = Main menu
*/
enum MenuType { Item = 0, Text = 1, Exit = 2 };
struct MenuEntry {
    const rom char* Text;           // Menu Text
    char Type;                      // see MenuType
    unsigned char state;              // Menu Function, if NULL then text-only
};

void menu_statemachine(void);
void menu_set_state(unsigned char s);
void menu_cancel(void);
void menu_done(void);
void menu_management(unsigned char menu_size, struct MenuEntry menu[]);
void menu_show(struct MenuEntry menu[], unsigned char* line_cur, unsigned char* line_old);
void menu_init(void);

#endif	/* MENU_H */

